#ifndef MODELCOMPONENT_H
#define MODELCOMPONENT_H

#include <wx/string.h>
#include <wx/datetime.h>  // 添加这个头文件
#include <vector>
#include <map>

class CModelComponent
{
public:
    struct ComponentMetadata {
        wxString name;
        wxString version;
        wxString author;
        wxString description;
        std::vector<wxString> dependencies;
        std::map<wxString, wxString> interfaces;
        double qualityScore;
        wxDateTime createdAt;
        wxDateTime lastModified;
    };

    CModelComponent(const ComponentMetadata& metadata, const wxString& content);
    
    bool Validate() const;
    wxString GetExportFormat() const;
    bool CheckCompatibility(const CModelComponent& other) const;
    
    ComponentMetadata GetMetadata() const { return m_metadata; }
    wxString GetContent() const { return m_content; }
    
    void UpdateVersion(const wxString& newVersion);
    void AddDependency(const wxString& componentName);

private:
    ComponentMetadata m_metadata;
    wxString m_content;
};

#endif
